/**
 * Decision Tree that main task is to interact between C++ faif library and Python.
 * From Python we have all functions to operate od DTC with template param <std::string>
 */
#pragma once

#include <boost/python.hpp>
#include "boost/python/detail/wrap_python.hpp"
#include <faif/learning/DecisionTree.hpp>
#include "typedefs.hpp"

using namespace std;
using namespace boost::python;

/**
 * All methods have their expelenation in implementation
 * @see ZPRDecisionTree.cpp
 */

class ZPRDecisionTree{
    public:
        ZPRDecisionTree();
        virtual ~ZPRDecisionTree(void) {}

        void zprPassDomain(boost::python::object domain_name,  boost::python::object domain);
        void zprPassAttributeDomain(boost::python::object attributeDomain);
        void zprPassAttributeDomainWithName(boost::python::object category_name, boost::python::object attributeDomain);
        void zprPassTrainExamples(boost::python::object trainExamples, boost::python::object trainCategory);
        void zprPassTestExample(boost::python::object testExamples);
		void applyTree();
		void zprTrain();
        void zprReset();

        object zprGetCategoryDomainFromDTC();
		object zprGetAttrDomainsFromDTC();
		object zprGetCategoryFromDTC(object o);
		object zprGetCategoryIddFromDTC(object o);
        object zprGetCategoriesFromDTC(object o);

        void zprSetParamToDTC(object o);


    private:
        ZPRDecisionTree(const Domains& attr_domains, const AttrDomain& category_domain);

        DTC*    pointerToDecisionTree_;

		ZprDomains domains_;
		ZprAttrDomain attrDomain_;
		ZprExamplesTrain examples_;
		ZprExampleTest tests_;

		bool haveAttrDomain_;
		bool newDomains_;

        faif::ml::DecisionTreeTrainParam param_; //params for training decision tree

 };

